<?php
require_once '../config/common.php';
require_once '../config/config.php';
$user=checksession();
$conn = new mysqli(HOST, USER, PASSWORD, DATABASE);
if ($conn->connect_errno) {
    throw new Exception('连接数据库失败' . $conn->connect_error);
}
$stmt = $conn->prepare("select * from info_list where id=1");
$stmt->execute();
$stmt->bind_result($id,$about,$contact);
$stmt->fetch();
$col=$_REQUEST['col'];
?>
<!DOCTYPE html>

<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
        <form action="infooperation.php" method="post" enctype="multipart/form-data">
            <input type="hidden" name="col" value="<?php echo $col; ?>"/>
            <script id="container" name="content" type="text/plain"><?php echo ($col=='about')?$about:$contact;?></script>
            <input type="submit" value="确认修改">
        </form>
        <script type="text/javascript" src="../ueditor/ueditor.config.js"></script>
        <!-- 编辑器源码文件 -->
        <script type="text/javascript" src="../ueditor/ueditor.all.js"></script>
        <!-- 实例化编辑器 -->
        <script type="text/javascript">
            var ue = UE.getEditor('container');
        </script>
    </body>
</html>